package com.baijiaoxi.common.model.local;

public class ThreadLocalUtil {
    private static ThreadLocal<Object> threadLocal = new ThreadLocal<>();

    public static void set(Object object) {
        threadLocal.set(object);
    }

    public static <T> T get() {
        Object object = threadLocal.get();
        return object == null ? null : (T) object;
    }

    public static void clear() {
        threadLocal.remove();
    }
}
